#ifndef ALARM_FLASHCD_H_
#define ALARM_FLASHCD_H_


#define FLASHCD_FLAG   0x1c9ffc
#define CCE_FETCH      0x1a10701c

#define ACK         6
#define NACK        21

typedef enum
{
	UPKT_TOKEN_A = 'A',
	UPKT_TOKEN_D = 'D',
	UPKT_TOKEN_E = 'E',
}UPKT_TOKEN;

typedef enum
{
	UPKT_A_LEN = 5,
	UPKT_D_LEN = 131,
	UPKT_E_LEN = 3,
}UPKT_LEN;

#define APP1_ADDR_P  0x6080
#define APP2_ADDR_P  0x14080

void flash_cd();
void check_flash_flag();
void (*app1_p)();
void (*app2_p)();

#define app1() ((*app1_p)())
#define app2() ((*app2_p)())

#endif
